package com.zplus.managers.petservices;

import com.zplus.managers.petservices.entities.Pet;
import com.zplus.managers.petservices.services.PetService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.sql.Date;
import java.util.Map;

@SpringBootTest
public class PetServiceDemos
{
    @Autowired
    private PetService petService;
    @Test
    void testInsertPet()
    {
        Pet newPet = new Pet();
        newPet.setPetname("黄豆");
        newPet.setSpecies("橘猫");
        newPet.setGender("雄性");
        newPet.setBirthday("2022-02-03");
    }

    @Test
    void testDate()
    {
        String date = "2022-02-02";
        String strs[] = date.split("-");
        Date d = new Date(2022, 02, 02);
    }
}
